﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;

public partial class Inventory_ReceiveList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.txtBeginDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
            this.txtEndDate.Text =  DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd");
        }
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        Label lbl = (Label)e.Row.FindControl("lblIsAccept");
        if (lbl != null)
        {
            if (DataBinder.Eval(e.Row.DataItem, "IsAccept") != null)
            {
                switch (DataBinder.Eval(e.Row.DataItem, "IsAccept").ToString().ToLower())
                {
                    case "true":
                        lbl.Text = "受理";
                        lbl.Font.Bold = true;
                        break;
                    case "false":
                        lbl.Text = "拒绝";
                        lbl.Font.Bold = true;
                        lbl.ForeColor = Color.Red;
                        break;
                }
            }
            else
            {
                lbl.Text = "未处理";
            }
        }
    }
}
